import http from "@/axios/index.js";

export const UserApi = {
    getUserList: (params) => {
        return http.get('/users', { params });
    },
    getUserById: (id) => {
        return http.get(`/users/${id}`);
    },
    createUser: (user) => {
        return http.post('/users', user);
    },
    updateUser: (id, user) => {
        return http.put(`/users/${id}`, user);
    },
    deleteUser: (id) => {
        return http.delete(`/users/${id}`);
    }
}